<!--
 * @Author: lxw
 * @Date: 2021-02-22 11:54:43
 * @Description: 干货页面
 -->
<template>
  <div>
    <BannerImage v-bind="banner" />
    <ArticleList
      :key="type"
      category="GanHuo"
      :type="type"
    />
  </div>
</template>

<script>
import BannerImage from '@/components/BannerImage'
import ArticleList from '@/components/ArticleList'

export default {
  name: 'GanHuo',
  components: { BannerImage, ArticleList },
  props: {
    type: {
      type: String,
      required: true
    }
  },
  computed: {
    banner () {
      const typeMap = {
        Android: {
          url: 'https://ae01.alicdn.com/kf/Ueb3a423c274b482f83bdd7d10fb4202cZ.jpg',
          title: 'Always deliver more than expected.（Larry Page）'
        },
        Flutter: {
          url: 'https://gank.io/images/c1ce555daf954961a05a69e64892b2cc',
          title: 'The man who has made up his mind to win will never say “ Impossible”。（ Napoleon ）'
        },
        iOS: {
          url: 'https://gank.io/images/d435eaad954849a5b28979dd3d2674c7',
          title: 'Innovation distinguishes between a leader and a follower.（Steve Jobs）'
        }
      }

      return typeMap[this.type]
    }
  }
}
</script>

<style scoped>

</style>
